package org.hhchat.leetcode.string;

public class code58_easy {

    public int lengthOfLastWord(String s) {
        String[] strs = s.split("\\s");
        if (strs.length == 0) {
            return 0;
        }
        String lastStr = strs[strs.length - 1];
        return lastStr.length();
    }

}
